package com.itheima.dubbo.mysql.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.commons.pojo.entity.Distribution;

import com.itheima.commons.pojo.entity.RegisterLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @author sun
 * @date 2021/12/18
 * @Version 1.0
 * @describe
 */
@Mapper
public interface LogMapper extends BaseMapper<RegisterLog> {
    Distribution findDayActiveUser(@Param("date") String date);
    List<Long> findDayRetentionUser(@Param("date") String date);
    //过去7天活跃用户：过去7天登录过的所有用户数量(去重)
    Long findActivePassWeek(@Param("passWeekTime") Date passWeekTime,@Param("nowTime") Date nowTime);
    //登录次数
    Long findLoginTimesToday(@Param("date") String date);
    //活跃用户
    Long findActiveUsersToday(@Param("date") String date);
}
